\(\int \frac {1}{a x+b x^3+c x^5} \, dx\) [86]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 69 \[ \int \frac {1}{a x+b x^3+c x^5} \, dx=\frac {b \text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 a \sqrt {b^2-4 a c}}+\frac {\log (x)}{a}-\frac {\log \left (a+b x^2+c x^4\right )}{4 a} \]

[Out]

ln(x)/a-1/4*ln(c*x^4+b*x^2+a)/a+1/2*b*arctanh((2*c*x^2+b)/(-4*a*c+b^2)^(1/2))/a/(-4*a*c+b^2)^(1/2)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {1608, 1128, 719, 29, 648, 632, 212, 642} \[ \int \frac {1}{a x+b x^3+c x^5} \, dx=\frac {b \text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 a \sqrt {b^2-4 a c}}-\frac {\log \left (a+b x^2+c x^4\right )}{4 a}+\frac {\log (x)}{a} \]

[In]

Int[(a*x + b*x^3 + c*x^5)^(-1),x]

[Out]

(b*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*a*Sqrt[b^2 - 4*a*c]) + Log[x]/a - Log[a + b*x^2 + c*x^4]/(4*a)

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 719

Int[1/(((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)), x_Symbol] :> Dist[e^2/(c*d^2 - b*d*e + a*e^2
), Int[1/(d + e*x), x], x] + Dist[1/(c*d^2 - b*d*e + a*e^2), Int[(c*d - b*e - c*e*x)/(a + b*x + c*x^2), x], x]
 /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0]

Rule 1128

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)*(a +
 b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && IntegerQ[(m - 1)/2]

Rule 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{x \left (a+b x^2+c x^4\right )} \, dx \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {1}{x \left (a+b x+c x^2\right )} \, dx,x,x^2\right ) \\ & = \frac {\text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )}{2 a}+\frac {\text {Subst}\left (\int \frac {-b-c x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 a} \\ & = \frac {\log (x)}{a}-\frac {\text {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a}-\frac {b \text {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a} \\ & = \frac {\log (x)}{a}-\frac {\log \left (a+b x^2+c x^4\right )}{4 a}+\frac {b \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 a} \\ & = \frac {b \tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 a \sqrt {b^2-4 a c}}+\frac {\log (x)}{a}-\frac {\log \left (a+b x^2+c x^4\right )}{4 a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.64 \[ \int \frac {1}{a x+b x^3+c x^5} \, dx=\frac {4 \sqrt {b^2-4 a c} \log (x)-\left (b+\sqrt {b^2-4 a c}\right ) \log \left (b-\sqrt {b^2-4 a c}+2 c x^2\right )+\left (b-\sqrt {b^2-4 a c}\right ) \log \left (b+\sqrt {b^2-4 a c}+2 c x^2\right )}{4 a \sqrt {b^2-4 a c}} \]

[In]

Integrate[(a*x + b*x^3 + c*x^5)^(-1),x]

[Out]

(4*Sqrt[b^2 - 4*a*c]*Log[x] - (b + Sqrt[b^2 - 4*a*c])*Log[b - Sqrt[b^2 - 4*a*c] + 2*c*x^2] + (b - Sqrt[b^2 - 4
*a*c])*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x^2])/(4*a*Sqrt[b^2 - 4*a*c])

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.94

method result size
default \(\frac {\ln \left (x \right )}{a}-\frac {\frac {\ln \left (c \,x^{4}+b \,x^{2}+a \right )}{2}+\frac {b \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{2 a}\) \(65\)
risch \(\frac {\ln \left (x \right )}{a}+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\left (4 c \,a^{2}-b^{2} a \right ) \textit {\_Z}^{2}+\left (4 a c -b^{2}\right ) \textit {\_Z} +c \right )}{\sum }\textit {\_R} \ln \left (\left (\left (10 a c -3 b^{2}\right ) \textit {\_R} +5 c \right ) x^{2}-a b \textit {\_R} +2 b \right )\right )}{2}\) \(77\)

[In]

int(1/(c*x^5+b*x^3+a*x),x,method=_RETURNVERBOSE)

[Out]

ln(x)/a-1/2/a*(1/2*ln(c*x^4+b*x^2+a)+b/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 223, normalized size of antiderivative = 3.23 \[ \int \frac {1}{a x+b x^3+c x^5} \, dx=\left [\frac {\sqrt {b^{2} - 4 \, a c} b \log \left (\frac {2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c + {\left (2 \, c x^{2} + b\right )} \sqrt {b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) - {\left (b^{2} - 4 \, a c\right )} \log \left (c x^{4} + b x^{2} + a\right ) + 4 \, {\left (b^{2} - 4 \, a c\right )} \log \left (x\right )}{4 \, {\left (a b^{2} - 4 \, a^{2} c\right )}}, \frac {2 \, \sqrt {-b^{2} + 4 \, a c} b \arctan \left (-\frac {{\left (2 \, c x^{2} + b\right )} \sqrt {-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) - {\left (b^{2} - 4 \, a c\right )} \log \left (c x^{4} + b x^{2} + a\right ) + 4 \, {\left (b^{2} - 4 \, a c\right )} \log \left (x\right )}{4 \, {\left (a b^{2} - 4 \, a^{2} c\right )}}\right ] \]

[In]

integrate(1/(c*x^5+b*x^3+a*x),x, algorithm="fricas")

[Out]

[1/4*(sqrt(b^2 - 4*a*c)*b*log((2*c^2*x^4 + 2*b*c*x^2 + b^2 - 2*a*c + (2*c*x^2 + b)*sqrt(b^2 - 4*a*c))/(c*x^4 +
 b*x^2 + a)) - (b^2 - 4*a*c)*log(c*x^4 + b*x^2 + a) + 4*(b^2 - 4*a*c)*log(x))/(a*b^2 - 4*a^2*c), 1/4*(2*sqrt(-
b^2 + 4*a*c)*b*arctan(-(2*c*x^2 + b)*sqrt(-b^2 + 4*a*c)/(b^2 - 4*a*c)) - (b^2 - 4*a*c)*log(c*x^4 + b*x^2 + a)
+ 4*(b^2 - 4*a*c)*log(x))/(a*b^2 - 4*a^2*c)]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 253 vs. \(2 (60) = 120\).

Time = 8.64 (sec) , antiderivative size = 253, normalized size of antiderivative = 3.67 \[ \int \frac {1}{a x+b x^3+c x^5} \, dx=\left (- \frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) \log {\left (x^{2} + \frac {- 8 a^{2} c \left (- \frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) + 2 a b^{2} \left (- \frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) - 2 a c + b^{2}}{b c} \right )} + \left (\frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) \log {\left (x^{2} + \frac {- 8 a^{2} c \left (\frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) + 2 a b^{2} \left (\frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) - 2 a c + b^{2}}{b c} \right )} + \frac {\log {\left (x \right )}}{a} \]

[In]

integrate(1/(c*x**5+b*x**3+a*x),x)

[Out]

(-b*sqrt(-4*a*c + b**2)/(4*a*(4*a*c - b**2)) - 1/(4*a))*log(x**2 + (-8*a**2*c*(-b*sqrt(-4*a*c + b**2)/(4*a*(4*
a*c - b**2)) - 1/(4*a)) + 2*a*b**2*(-b*sqrt(-4*a*c + b**2)/(4*a*(4*a*c - b**2)) - 1/(4*a)) - 2*a*c + b**2)/(b*
c)) + (b*sqrt(-4*a*c + b**2)/(4*a*(4*a*c - b**2)) - 1/(4*a))*log(x**2 + (-8*a**2*c*(b*sqrt(-4*a*c + b**2)/(4*a
*(4*a*c - b**2)) - 1/(4*a)) + 2*a*b**2*(b*sqrt(-4*a*c + b**2)/(4*a*(4*a*c - b**2)) - 1/(4*a)) - 2*a*c + b**2)/
(b*c)) + log(x)/a

Maxima [F]

\[ \int \frac {1}{a x+b x^3+c x^5} \, dx=\int { \frac {1}{c x^{5} + b x^{3} + a x} \,d x } \]

[In]

integrate(1/(c*x^5+b*x^3+a*x),x, algorithm="maxima")

[Out]

-integrate((c*x^3 + b*x)/(c*x^4 + b*x^2 + a), x)/a + log(x)/a

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.99 \[ \int \frac {1}{a x+b x^3+c x^5} \, dx=-\frac {b \arctan \left (\frac {2 \, c x^{2} + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt {-b^{2} + 4 \, a c} a} - \frac {\log \left (c x^{4} + b x^{2} + a\right )}{4 \, a} + \frac {\log \left (x^{2}\right )}{2 \, a} \]

[In]

integrate(1/(c*x^5+b*x^3+a*x),x, algorithm="giac")

[Out]

-1/2*b*arctan((2*c*x^2 + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*a) - 1/4*log(c*x^4 + b*x^2 + a)/a + 1/2*lo
g(x^2)/a

Mupad [B] (verification not implemented)

Time = 9.04 (sec) , antiderivative size = 1014, normalized size of antiderivative = 14.70 \[ \int \frac {1}{a x+b x^3+c x^5} \, dx=\frac {\ln \left (x\right )}{a}+\frac {\ln \left (c\,x^4+b\,x^2+a\right )\,\left (8\,a\,c-2\,b^2\right )}{2\,\left (4\,a\,b^2-16\,a^2\,c\right )}+\frac {b\,\mathrm {atan}\left (\frac {16\,a^3\,x^2\,\left (\frac {\left (3\,b^3-8\,a\,b\,c\right )\,\left (\frac {{\left (8\,a\,c-2\,b^2\right )}^2\,\left (10\,b\,c^3-\frac {\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )\,\left (8\,a\,c-2\,b^2\right )}{2\,\left (4\,a\,b^2-16\,a^2\,c\right )}\right )}{4\,{\left (4\,a\,b^2-16\,a^2\,c\right )}^2}-\frac {b^2\,\left (10\,b\,c^3-\frac {\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )\,\left (8\,a\,c-2\,b^2\right )}{2\,\left (4\,a\,b^2-16\,a^2\,c\right )}\right )}{16\,a^2\,\left (4\,a\,c-b^2\right )}+\frac {b^2\,\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )\,\left (8\,a\,c-2\,b^2\right )}{16\,a^2\,\left (4\,a\,b^2-16\,a^2\,c\right )\,\left (4\,a\,c-b^2\right )}\right )}{8\,a^3\,c^2\,\left (25\,a\,c-6\,b^2\right )}-\frac {\left (10\,a^2\,c^2-14\,a\,b^2\,c+3\,b^4\right )\,\left (\frac {b^3\,\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )}{64\,a^3\,{\left (4\,a\,c-b^2\right )}^{3/2}}-\frac {b\,\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )\,{\left (8\,a\,c-2\,b^2\right )}^2}{16\,a\,{\left (4\,a\,b^2-16\,a^2\,c\right )}^2\,\sqrt {4\,a\,c-b^2}}+\frac {b\,\left (8\,a\,c-2\,b^2\right )\,\left (10\,b\,c^3-\frac {\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )\,\left (8\,a\,c-2\,b^2\right )}{2\,\left (4\,a\,b^2-16\,a^2\,c\right )}\right )}{4\,a\,\left (4\,a\,b^2-16\,a^2\,c\right )\,\sqrt {4\,a\,c-b^2}}\right )}{8\,a^3\,c^2\,\sqrt {4\,a\,c-b^2}\,\left (25\,a\,c-6\,b^2\right )}\right )\,{\left (4\,a\,c-b^2\right )}^{3/2}}{b^2\,c^2}+\frac {2\,\left (3\,b^3-8\,a\,b\,c\right )\,{\left (4\,a\,c-b^2\right )}^{3/2}\,\left (\frac {{\left (8\,a\,c-2\,b^2\right )}^2\,\left (4\,b^2\,c^2-\frac {2\,a\,b^2\,c^2\,\left (8\,a\,c-2\,b^2\right )}{4\,a\,b^2-16\,a^2\,c}\right )}{4\,{\left (4\,a\,b^2-16\,a^2\,c\right )}^2}-\frac {b^2\,\left (4\,b^2\,c^2-\frac {2\,a\,b^2\,c^2\,\left (8\,a\,c-2\,b^2\right )}{4\,a\,b^2-16\,a^2\,c}\right )}{16\,a^2\,\left (4\,a\,c-b^2\right )}+\frac {b^4\,c^2\,\left (8\,a\,c-2\,b^2\right )}{4\,a\,\left (4\,a\,b^2-16\,a^2\,c\right )\,\left (4\,a\,c-b^2\right )}\right )}{b^2\,c^4\,\left (25\,a\,c-6\,b^2\right )}-\frac {2\,\left (4\,a\,c-b^2\right )\,\left (10\,a^2\,c^2-14\,a\,b^2\,c+3\,b^4\right )\,\left (\frac {b^5\,c^2}{16\,a^2\,{\left (4\,a\,c-b^2\right )}^{3/2}}-\frac {b^3\,c^2\,{\left (8\,a\,c-2\,b^2\right )}^2}{4\,{\left (4\,a\,b^2-16\,a^2\,c\right )}^2\,\sqrt {4\,a\,c-b^2}}+\frac {b\,\left (8\,a\,c-2\,b^2\right )\,\left (4\,b^2\,c^2-\frac {2\,a\,b^2\,c^2\,\left (8\,a\,c-2\,b^2\right )}{4\,a\,b^2-16\,a^2\,c}\right )}{4\,a\,\left (4\,a\,b^2-16\,a^2\,c\right )\,\sqrt {4\,a\,c-b^2}}\right )}{b^2\,c^4\,\left (25\,a\,c-6\,b^2\right )}\right )}{2\,a\,\sqrt {4\,a\,c-b^2}} \]

[In]

int(1/(a*x + b*x^3 + c*x^5),x)

[Out]

log(x)/a + (log(a + b*x^2 + c*x^4)*(8*a*c - 2*b^2))/(2*(4*a*b^2 - 16*a^2*c)) + (b*atan((16*a^3*x^2*(((3*b^3 -
8*a*b*c)*(((8*a*c - 2*b^2)^2*(10*b*c^3 - ((12*b^3*c^2 - 40*a*b*c^3)*(8*a*c - 2*b^2))/(2*(4*a*b^2 - 16*a^2*c)))
)/(4*(4*a*b^2 - 16*a^2*c)^2) - (b^2*(10*b*c^3 - ((12*b^3*c^2 - 40*a*b*c^3)*(8*a*c - 2*b^2))/(2*(4*a*b^2 - 16*a
^2*c))))/(16*a^2*(4*a*c - b^2)) + (b^2*(12*b^3*c^2 - 40*a*b*c^3)*(8*a*c - 2*b^2))/(16*a^2*(4*a*b^2 - 16*a^2*c)
*(4*a*c - b^2))))/(8*a^3*c^2*(25*a*c - 6*b^2)) - ((3*b^4 + 10*a^2*c^2 - 14*a*b^2*c)*((b^3*(12*b^3*c^2 - 40*a*b
*c^3))/(64*a^3*(4*a*c - b^2)^(3/2)) - (b*(12*b^3*c^2 - 40*a*b*c^3)*(8*a*c - 2*b^2)^2)/(16*a*(4*a*b^2 - 16*a^2*
c)^2*(4*a*c - b^2)^(1/2)) + (b*(8*a*c - 2*b^2)*(10*b*c^3 - ((12*b^3*c^2 - 40*a*b*c^3)*(8*a*c - 2*b^2))/(2*(4*a
*b^2 - 16*a^2*c))))/(4*a*(4*a*b^2 - 16*a^2*c)*(4*a*c - b^2)^(1/2))))/(8*a^3*c^2*(4*a*c - b^2)^(1/2)*(25*a*c -
6*b^2)))*(4*a*c - b^2)^(3/2))/(b^2*c^2) + (2*(3*b^3 - 8*a*b*c)*(4*a*c - b^2)^(3/2)*(((8*a*c - 2*b^2)^2*(4*b^2*
c^2 - (2*a*b^2*c^2*(8*a*c - 2*b^2))/(4*a*b^2 - 16*a^2*c)))/(4*(4*a*b^2 - 16*a^2*c)^2) - (b^2*(4*b^2*c^2 - (2*a
*b^2*c^2*(8*a*c - 2*b^2))/(4*a*b^2 - 16*a^2*c)))/(16*a^2*(4*a*c - b^2)) + (b^4*c^2*(8*a*c - 2*b^2))/(4*a*(4*a*
b^2 - 16*a^2*c)*(4*a*c - b^2))))/(b^2*c^4*(25*a*c - 6*b^2)) - (2*(4*a*c - b^2)*(3*b^4 + 10*a^2*c^2 - 14*a*b^2*
c)*((b^5*c^2)/(16*a^2*(4*a*c - b^2)^(3/2)) - (b^3*c^2*(8*a*c - 2*b^2)^2)/(4*(4*a*b^2 - 16*a^2*c)^2*(4*a*c - b^
2)^(1/2)) + (b*(8*a*c - 2*b^2)*(4*b^2*c^2 - (2*a*b^2*c^2*(8*a*c - 2*b^2))/(4*a*b^2 - 16*a^2*c)))/(4*a*(4*a*b^2
 - 16*a^2*c)*(4*a*c - b^2)^(1/2))))/(b^2*c^4*(25*a*c - 6*b^2))))/(2*a*(4*a*c - b^2)^(1/2))